package com.jensen.service;

import com.github.pagehelper.PageHelper;
import com.jensen.mapper.UserMapper;
import com.jensen.mapper.base.BaseMapper;
import com.jensen.po.User;
import com.jensen.service.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Jensen on 2016/10/25.
 */
@Service
public class UserServiceImpl extends BaseServiceImpl<User,Long> implements UserService{

    @Resource
    private UserMapper userMapper;

    public BaseMapper<User, Long> getMapper() {
        return userMapper;
    }

    public User findOne(Long id){
        return this.userMapper.findOne(id);
    }

    public Object getPage(){
        return getPageRs(1,10,"findAll");
    }

    public Object findGrngood(){
        return getPageRs(1,1,"findGrngood");
    }

    public Object tt(){
        PageHelper.startPage(1,10,"id");
        return this.userMapper.findAll();
    }

}
